package com.iss.okair.db.mapper;

import com.iss.okair.db.entity.Sysuser;
import com.iss.okair.db.entity.SysuserRole;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

public interface  SysuserMapper {
    @Select("select id ,uid,pwd,nickName,role,createTime from sysuser where uid=#{uid} and pwd=#{pwd}")
    List<Sysuser> loginCheck(Sysuser loginUser);
    //条件查询的接口
    @SelectProvider(type = com.iss.okair.db.mapper.sql.SysuserSQL.class,method = "findUser")

    List<Sysuser> selectByExample(Sysuser example);
    //查询权限的接口
    @Select("select DISTINCT role from sysuser")
    List<SysuserRole> selectAllRoler();

}
